<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>数据列表页面</title>
    <!-- layui.css -->
    <link href="__PLUGIN__/layui/css/layui.css" rel="stylesheet" />
    <style>
        .layui-btn-small {
            padding: 0 15px;
        }

        .layui-form-checkbox {
            margin: 0;
        }

        tr td:not(:nth-child(0)),
        tr th:not(:nth-child(0)) {
            text-align: center;
        }

        #dataConsole {
            text-align: center;
        }
        /*分页页容量样式*/
        /*可选*/
        .layui-laypage {
            display: block;
        }

        /*可选*/
        .layui-laypage > * {
            float: left;
        }
        /*可选*/
        .layui-laypage .laypage-extend-pagesize {
            float: right;
        }
        /*可选*/
        .layui-laypage:after {
            content: ".";
            display: block;
            height: 0;
            clear: both;
            visibility: hidden;
        }

        /*必须*/
        .layui-laypage .laypage-extend-pagesize {
            height: 30px;
            line-height: 30px;
            margin: 0px;
            border: none;
            font-weight: 400;
        }
        /*分页页容量样式END*/
    </style>
</head>
<body>
<fieldset id="dataConsole" class="layui-elem-field layui-field-title" >
    <legend>控制台</legend>
    <div class="layui-field-box">
        <div id="articleIndexTop">
            <form class="layui-form layui-form-pane" action="">
                <div class="layui-form-item" style="margin:0;margin-top:15px;">
                    <div class="layui-inline">
                        <label class="layui-form-label">分类</label>
                        <div class="layui-input-inline">
                            <select name="cid" id="">
                                <option value="请选择分类"></option>
                                {volist name="cate" id="val"}
                                <option value="{$val.id}">{$val.cate}</option>
                                {/volist}
                            </select>
                        </div>
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keywords" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline" style="width:auto">
                            <button class="layui-btn" lay-submit lay-filter="formSearch">搜索</button>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width:auto">
                            <a id="addArticle" class="layui-btn layui-btn-normal">发表文章</a>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</fieldset>
<fieldset id="dataList" class="layui-elem-field layui-field-title sys-list-field">
    <legend style="text-align:center;">文章列表</legend>
    <div class="layui-field-box">
        <table class="layui-table" >
            <colgroup>
                <col width="30">
                <col width="180">
                <col width="100">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="50">
                <col width="50">
            </colgroup>
            <thead>
            <tr>
                <th>ID</th>
                <th>标题</th>
                <th>标签</th>
                <th>状态</th>
                <th>加入时间</th>
                <th colspan="2">选项</th>
                <th colspan="2">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name='res' id="val"}
            <tr>
                <td>{$val.id}</td>
                <td>{$val.title}</td>
                <td>{$val.cate}</td>
                <td>
                    {if condition="($val.status == 1)"}
                    <span class="layui-btn layui-btn-normal layui-btn-small">显示</span>
                    {else /}
                    <span class="layui-btn layui-btn-disabled layui-btn-small">不显示</span>
                    {/if}
                </td>
                <td>{$val.addtime}</td>
                <td>
                    <form class="layui-form" action="">
                        <div class="layui-form-item" style="margin:0;">
                            <input type="checkbox" name="top" title="置顶" lay-filter="top" checked>
                        </div>
                    </form>
                </td>
                <td>
                    <form class="layui-form" action="">
                        <div class="layui-form-item" style="margin:0;">
                            <input type="checkbox" name="top" title="推荐" lay-filter="recommend" checked>
                        </div>
                    </form>
                </td>
                <td>
                    <button class="layui-btn layui-btn-small layui-btn-normal"><i class="layui-icon">&#xe642;</i></button>
                    <button class="layui-btn layui-btn-small layui-btn-danger del" id="{$val.id}"><i class="layui-icon">&#xe640;</i></button>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="pull-right layui-box layui-laypage layui-laypage-default">
            {$res->render()}
        </div>
    </div>
</fieldset>
<!-- layui.js -->
<script src="__PLUGIN__/layui/layui.js"></script>
<!-- layui规范化用法 -->
<script type="text/javascript">
    layui.config({
        base: '__ADMIN_JS__/'
    }).use('datalist');
</script>
</body>
</html>